package main

import (
	"fmt"
	"github.com/jinzhu/gorm"
)
import _ "github.com/jinzhu/gorm/dialects/mysql"

func main() {
	db, err := gorm.Open("mysql", "root:root@tcp(172.20.0.10:3306)/gogogo?charset=utf8")
	if err != nil {
		panic("fail to connect db")
	}
	defer db.Close()
	fmt.Println(db)
}
